
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Widgets)
message(STATUS "SELF -- Qt Version: ${QT_VERSION_MAJOR}")
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)

add_executable(ZeDiskApp
    app.cpp
    zediskapp.cpp
    zediskapp.h
    zediskapp.ui
    ZeDiskClient.cpp
    ZeDiskClient.h
    DirTask.cpp
    DirTask.h
    UploadTask.cpp
    UploadTask.h
    DownLoadTask.cpp
    DownLoadTask.h
)

target_link_libraries(
    ZeDiskApp
    PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
    PRIVATE ZeDisk
)